
public class ParesEnCadenaApp {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		String s = "34659234023485001";
		int nPares = 0;
		int nImpares = 0;
		
		for(int i = 0; i < s.length(); i++) {
			
			int n = Integer.parseInt(s.substring(i, i+1));
			
			if (n % 2 == 0)
				nPares++;
			else
				nImpares++;
		}
			
		System.out.println("Cadena: "+s);
		System.out.println("Pares: "+ nPares);
		System.out.println("Impares: "+ nImpares);
	}

}
